package com.qf.common.utils;

import org.mindrot.jbcrypt.BCrypt;

public class PasswordEncoding {
    //对密码进行加密
    public static String hashPw(String pw) {
        return BCrypt.hashpw(pw, BCrypt.gensalt());
    }

    //密码的对比
    public static boolean checkPw(String pw, String dbPw) {
        return BCrypt.checkpw(pw, dbPw);

    }
}
